<template>
    <a-card class="info" title="框架合同档案管理">
      <template slot="extra">
        <!--<a-button
            class="ruleButton"
            :ghost="true"
            type="primary"
            icon="edit"
            @click="handleEdit(model)"
            :disabled="isDisabledAuth('erpOmcContractManagerFinal:edit')"
        />-->
      </template>
      <a-row type="flex" justify="center">
        <a-col :span="24">
          <!-- <erp-omc-contract-manager-final-form ref="realForm" :disabled="true" files normal></erp-omc-contract-manager-final-form> -->
          <ErpOmcContractManagerDetailForm ref="realForm" :disabled="true" files normal></ErpOmcContractManagerDetailForm>
        </a-col>
      </a-row>
  
      <erp-omc-contract-manager-final-modal ref="modalForm" @ok="modalFormOk"></erp-omc-contract-manager-final-modal>
  
  
      <a-row>
        <a-tabs :default-active-key="1">
  
          <a-tab-pane :key="1" tab="申请记录">
            <!-- <erp-omc-contract-manager-list2 ref="contractManagerList" :disabledButton="false"/> -->
            <ErpApplicationRecord ref="contractManagerList" :disabledButton="false"/>
          </a-tab-pane>
        </a-tabs>
      </a-row>
      <a-row>
        <a-tabs :default-active-key="1">
          <a-tab-pane :key="1" tab="关联项目收款合同">
            <!-- <erp-omc-contract-manager-list2 ref="contractManagerList" :disabledButton="false"/> -->
            <ErpRelatedContracts ref="erpRelatedContracts" :disabledButton="false"/>
          </a-tab-pane>
        </a-tabs>
      </a-row>
  
    </a-card>
  </template>
  
  <script>
  
  import { getAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
//   import ErpOmcContractManagerFinalForm from './modules/ErpOmcContractManagerFinalForm'
  import ErpOmcContractManagerDetailForm from './modules/ErpOmcContractManagerDetailForm'
  import ErpOmcContractManagerFinalModal from './modules/ErpOmcContractManagerFinalModal'
  import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'
  import ErpOmcContractManagerList2 from './ErpOmcContractManagerList2.vue'
  import ErpApplicationRecord from './ErpApplicationRecord.vue'
  import ErpRelatedContracts from './ErpRelatedContracts.vue'
  
  export default {
    name: 'ErpOmcFrameworkContractArchiveDetail',
    mixins: [JeecgListMixin, DisabledAuthFilterMixin],
    components: {
    //   ErpOmcContractManagerFinalForm,
      ErpOmcContractManagerFinalModal,
      ErpApplicationRecord,
      ErpRelatedContracts,
      ErpOmcContractManagerDetailForm,
      ErpOmcContractManagerList2
    },
    data() {
      return {
        model: {},
        id: '',
        url: {
          queryById: '/api/erp/omc/contractmanager/erpOmcContractManagerFinal/queryById',
          delete: '/api/erp/omc/contractmanager/erpOmcContractManagerFinal/delete',
        },
        confirmLoading: false,
        iconStyle: { 'font-size': '20px' },
      }
    },
    created() {
      /*this.$nextTick(()=>{
        this.$refs.contractManagerList.loadData(1);
      })*/
    },
    watch: {
      $route(to, from) {
        this.loadData();
        //this.$refs.contractManagerList.loadData();
      },
    },
    mounted() {
    },
    methods: {
      loadData() {
        const id = this.$route.params.id;
        getAction(this.url.queryById, { id }).then((res) => {
          if (res.success) {
            const model = res.result
            this.$refs.realForm.edit(model);
            this.model = model;
          }
        })
      },
    }
  }
  </script>
  <style lang="less" scoped>
  @import '~@assets/less/common.less';
  
  .info {
    /deep/ .ant-card-head-title {
      flex: none;
      margin-right: 20px;
    }
  
    /deep/ .ant-card-extra {
      flex: 1;
      float: left;
    }
  }
  </style>
  